package com.xindao.other;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

public class NetUtil {
  
  public static boolean isNetAvaliable(Context context){
    ConnectivityManager connect = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
    if(null != connect){
      NetworkInfo net = connect.getActiveNetworkInfo();
      if(null != net){
        return net.isAvailable();
      }
    }
    return false;
  }

}
